class rev
{
int num;
void show(int p)
{
num=p;
}
void cal ( )
{int remainder,result=0;
while (num>0)
{
remainder=num%10;
result=(result*10)+remainder;
num=num/10;
}
System.out.println ("Reverse of no is :"+ result);
}
}
class revrse
{
public static void main (String args[])
{
rev r =new rev();
r.show(123);
r.cal();
}
}